package com.dqyt.khjc.mapper;

import com.dqyt.app.bean.WorkBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface WorkMapper {


    public int addWork(WorkBean workBean);

    public List<WorkBean> getWorkList();

    public  List<WorkBean> getWorkListPage(int page,int size,String rwdbh,long wtfId,int mtype,int workTYpe,int workTYpeCh,int workTYpeCh2,long jyyId);

    public  long getWorkListPageTotle(String rwdbh,long wtfId,int mtype,int workTYpe,int workTYpeCh,int workTYpeCh2,long jyyId);


    public  List<WorkBean> getWorkListPagex(int page,int size,String rwdbh,long wtfId,int mtype,int workTYpe,int workTYpeCh,int workTYpeCh2,long jyyId);
    public  long getWorkListPageTotlex(String rwdbh,long wtfId,int mtype,int workTYpe,int workTYpeCh,int workTYpeCh2,long jyyId);


    public int updateWork(long userId,String bsbh,long workId,long updateTime,String updateUser);

    public int deleteWork(@Param("workId") long workId);


    public WorkBean getWorkListByBsbh(String bsbh);


    public long deleteWorkBybsbh(String bsbh);

    public long deleteWorkByrwdbh(String rwdbh);

    //批量更新
    public int updateStateByIDs(@Param("ids") String[] ids, @Param("jyyId") long  jyyId,String jyy,int workTYpe);


    public List<WorkBean> batchBsbhList(@Param("ids") String[] ids);

    /**
     * 待检验 到  待打印
     * @param bsbh
     * @param sbbh
     * @param workTYpe
     * @return
     */
    public int upfateWorkBhOrTp(String bsbh,String sbbh,int workTYpe);


    public int setworkTYpeYdy(@Param("ids") String[] ids,int workTYpe);

    /**
     * 更新已完成并且是已装箱的
     * @param ids
     * @return
     */
    public long updateWcOrYzxList(@Param("ids") String[] ids);

    /**
     * 更新已完成 但是还没装箱的
     * @param ids
     * @return
     */
    public long updateYwcOrWzxList(@Param("ids") String[] ids);


    /**
     * 更新已装箱 并且是已完成的
     * @param ids
     * @return
     */
    public long updateYzxOrYwcList(@Param("ids") String[] ids);

    /**
     * 更新已装箱 但是是未完成的
     * @param ids
     * @return
     */
    public long updateYzxOrWwcList(@Param("ids") String[] ids);



    public long setworkTYpeYff(@Param("ids") String[] ids);


    public int setworkTYpeYzxTo4(@Param("ids") String[] ids);

    /**
     * 标识编号和任务单编号查询
     * @param bsbh
     * @return
     */
    public long upWorkListByBsbhOrRwdbh(String bsbh,String  rwdbh,String sbbh);


    /**
     * 根据任务单编号查询
     * @param rwdbh
     * @return
     */
    public  List<WorkBean> getWorkListByRwdbh(String  rwdbh);



    public  List<WorkBean>  getWorkStatisticsPage(int page,int size,String rwdbh,long wtfId,long wtfchId,long startTime,long endTime,long jyyId);


    public long  getWorkStatisticsTotle(String rwdbh,long wtfId,long wtfchId,long startTime,long endTime,long jyyId);


    public  List<WorkBean>  getWorkStatistics(String rwdbh,long wtfId,long wtfchId,long startTime,long endTime,long jyyId);


    public  List<WorkBean>  getTzStatisticsPage(int page,int size,String rwdbh,long wtfId,long wtfchId,long startTime,long endTime);


    public long  getTzStatisticsTotle(String rwdbh,long wtfId,long wtfchId,long startTime,long endTime);



    public  List<WorkBean>  getTzStatisticsPage2(String rwdbh,long wtfId,long wtfchId,long startTime,long endTime);




    public  List<WorkBean> getAdWorkListPage(int page,int size,String rwdbh,long wtfId,int mtype,int workTYpe,int workTYpeCh,int workTYpeCh2);

    public  List<WorkBean> getAdWorkListPagex(int page,int size,String rwdbh,long wtfId,int mtype,int workTYpe,int workTYpeCh,int workTYpeCh2);

    public  List<WorkBean> getAdWorkListPageAll(int page,int size,String rwdbh,long wtfId,int wtfchId,int mtype,int workTYpe,int workTYpeCh,int workTYpeCh2,long jyyId);

    public long getAdWorkListPageAllTotle(String rwdbh,long wtfId,int wtfchId,int mtype,int workTYpe,int workTYpeCh,int workTYpeCh2,long jyyId);



    /**
     * 查询气瓶
     * @param ids
     * @return
     */
    public  List<WorkBean> selectByIdSet(@Param("ids") String[] ids);



    public int updateJyyById(long workId,String jyy,long jyyId);



    public  List<WorkBean>  getWorkStatistics2(int page,int size,String rwdbh,long wtfId,long wtfchId,long startTime,long endTime,long jyyId);

}
